from datetime import datetime, timedelta


def get_weekday_name(weekday):
    """根据数字返回对应的星期几名称"""
    weekday_names = ["周一", "周二", "周三", "周四", "周五", "周六", "周日"]
    return weekday_names[weekday]


def generate_date_list():
    # 获取当前日期
    today = datetime.today()
    date_list = []

    # 生成日期列表
    for i in range(7):
        # 计算未来日期
        future_date = today + timedelta(days=i)
        # 获取月和日
        month = future_date.month
        day = future_date.day
        # 获取星期几
        weekday = future_date.weekday()
        # 格式化日期字符串
        if i == 0:
            date_str = f"今天{month}月{day}日"
        elif i == 1:
            date_str = f"明天{month}月{day}日"
        elif i == 2:
            date_str = f"后天{month}月{day}日"
        else:
            date_str = f"{get_weekday_name(weekday)}{month}月{day}日"
        # 添加到列表
        date_list.append(date_str)

    return date_list


# 调用函数并打印结果
date_list = generate_date_list()
# print(date_list)
